<script setup lang="ts">
	import { ref, onMounted } from "vue";
	import { formRules } from "./rule";
	import { FormProps } from "./types";
	import ReCol from "@/components/ReCol";
  import { message } from "@/utils/message";
  import {
    categorySelectApi,
    partSelectApi,
    brandSelectApi,
    supplierSelectApi
  } from "@/api/quotedPriceApi";

	const props = withDefaults(defineProps<FormProps>(), {
		formInline: () => ({
			title: "",
			status: 0,
			Id: 0,
		})
	});
	const ruleFormRef = ref();
	const newFormInline = ref(props.formInline);
	function getRef() {
		return ruleFormRef.value;
	}
	defineExpose({ getRef });

  onMounted(()=> {

  })

</script>

<template>
	<el-descriptions
    class="margin-top"
    title=" "
    :column="2"
    border
	  >
    <el-descriptions-item>
      <template #label>
        <div class="cell-item">

          产品名称
        </div>
      </template>
      {{newFormInline.productInfo.productName}}
    </el-descriptions-item>
    <el-descriptions-item>
      <template #label>
        <div class="cell-item">
          产品编号
        </div>
      </template>
      {{newFormInline.productInfo.productNo}}
    </el-descriptions-item>
    <el-descriptions-item>
      <template #label>
        <div class="cell-item">
          规格
        </div>
      </template>
      {{newFormInline.productInfo.productSpec}}
    </el-descriptions-item>
    <el-descriptions-item>
      <template #label>
        <div class="cell-item">
          单位
        </div>
      </template>
      {{newFormInline.productInfo.productUnit}}
    </el-descriptions-item>
    <el-descriptions-item>
      <template #label>
        <div class="cell-item">
          数量
        </div>
      </template>
      {{newFormInline.productInfo?.number * 1}}
    </el-descriptions-item>
    <el-descriptions-item>
      <template #label>
        <div class="cell-item">
          产品单价
        </div>
      </template>
      {{newFormInline.productInfo?.price * 1}}
    </el-descriptions-item>
    <el-descriptions-item>
      <template #label>
        <div class="cell-item">
          总金额
        </div>
      </template>
      {{newFormInline.productInfo?.amount * 1}}
    </el-descriptions-item>
    <el-descriptions-item>
      <template #label>
        <div class="cell-item">
          分类
        </div>
      </template>
      {{newFormInline.productInfo.category.name}}
    </el-descriptions-item>
    <el-descriptions-item>
      <template #label>
        <div class="cell-item">
          项目名称
        </div>
      </template>
      {{newFormInline.productInfo.project.projectName}}
    </el-descriptions-item>
    <el-descriptions-item>
      <template #label>
        <div class="cell-item">
          项目编码
        </div>
      </template>
      {{newFormInline.productInfo.project.projectNo}}
    </el-descriptions-item>
    <el-descriptions-item>
      <template #label>
        <div class="cell-item">
          仓库
        </div>
      </template>
      {{newFormInline.productInfo.store.storeName || newFormInline.productInfo.store.name}}
    </el-descriptions-item>
    <el-descriptions-item>
      <template #label>
        <div class="cell-item">
          设备
        </div>
      </template>
      {{newFormInline.devArr || '--'}}
    </el-descriptions-item>
    <el-descriptions-item>
      <template #label>
        <div class="cell-item">
          配件
        </div>
      </template>
       {{newFormInline.partsArr || '--'}}
    </el-descriptions-item>

    <el-descriptions-item>
      <template #label>
        <div class="cell-item">
          入库单日期
        </div>
      </template>
       {{newFormInline.productInfo.purchaseOrder.orderDate}}
    </el-descriptions-item>
    <el-descriptions-item>
      <template #label>
        <div class="cell-item">
          入库单号
        </div>
      </template>
       {{newFormInline.productInfo.purchaseOrder.orderNo}}
    </el-descriptions-item>
    <el-descriptions-item>
      <template #label>
        <div class="cell-item">
          创建人
        </div>
      </template>
       {{newFormInline.productInfo.createUser.name}}
    </el-descriptions-item>
    <el-descriptions-item :span="2">
      <template #label>
        <div class="cell-item">
          创建时间
        </div>
      </template>
       {{newFormInline.productInfo.createdAt}}
    </el-descriptions-item>
    <el-descriptions-item :span="2">
      <template #label>
        <div class="cell-item">
          备注
        </div>
      </template>
       {{newFormInline.productInfo.remarks}}
    </el-descriptions-item>
  </el-descriptions>
</template>
<style scoped>

</style>
